// 引入第三方模块
// 也是直接引入模块的名称

// commonJs规范规定了，当我们引入模块的时候，如果直接是模块名称，就会由一个查找的规则
// 先去同一层的node_modules里面查找,如果找不到，就回去上一级的node_modules里面找
const request = require("request");

request(
  "https://i.maoyan.com/api/mmdb/movie/v3/list/hot.json?ct=%E6%9D%AD%E5%B7%9E&ci=50&channelId=4",
  function (error, response, body) {
    console.error("error:", error); // Print the error if one occurred
    console.log("statusCode:", response && response.statusCode); // Print the response status code if a response was received
    console.log("body:", body); // Print the HTML for the Google homepage.
  }
);
